package com.example.demo.controller;

import com.alibaba.dubbo.config.annotation.Reference;
import com.example.demo.service.OrgService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by wangmu on 2018/1/29.
 */
@RestController
@RequestMapping("/org")
public class OrgController {

    @Reference(version = "1.0.10")
    private OrgService orgService;

    @RequestMapping("/getEmpAscriptionByCode")
    public Object getEmpAscriptionByCode(String code,Integer pageNo,Integer pageSize) {
        return orgService.getEmpAscriptionByDeptCode(code);
    }

    @RequestMapping("/getSubDeptByDeptCode")
    public Object getSubDeptByDeptCode(String deptCode, Integer type) {
        return orgService.getSubDeptByDeptCode(deptCode,type);
    }

    @RequestMapping("/getEmpCountInDept")
    public Object getEmpCountInDept(String deptCode) {
        return orgService.getEmpCountInDept(deptCode);
    }
}
